package com.whitlock.backend.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.whitlock.backend.dao.RoleDao;
import com.whitlock.backend.entity.TKRole;
import com.whitlock.backend.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("roleService")
public class RoleServiceImpl extends ServiceImpl<RoleDao,TKRole> implements RoleService {
    @Autowired
    private RoleDao roleDao;

    //删除角色
    @Override
    public void deleteRole(String id){
        roleDao.deleteById(id);
    }

    //更新角色
    @Override
    public void updateRole(TKRole role){
        roleDao.updateById(role);
    }

    //新增角色
    @Override
    public void addRole(TKRole role){
        roleDao.insert(role);
    }
}
